package day1107_3;

import java.util.Scanner;//1.

public class F2 {
    public static void main(String[] args) {
        Scanner  sc=new Scanner(System.in);//2.
        System.out.println("请输入商品价格：");
        double pri=sc.nextDouble();//3.
        int c;
        if(pri>=2000){
            c=8;
        }else{
            c=(int)pri/250;
        }

        double d=0;
        switch(c){
            case 0:  d=0; break;
            case 1:  d=5; break;
            case 2:  d=7.5; break;
            case 3:  d=7.5; break;
            case 4:  //如果c和4相等继续执行(因为没break) d=10
            case 5:
            case 6:
            case 7: d=10; break;
            case 8: d=15; break;
        }
        System.out.println(  "应付金额为："+ pri* (1-d/100)  );
    }
}


